package com.landerer.gui.header;

import java.io.Serializable;

import javax.enterprise.context.SessionScoped;
import javax.inject.Inject;
import javax.inject.Named;

import com.landerer.gui.emgmt.EmployeeBean;

@Named
@SessionScoped
public class HeaderMenuBean implements Serializable {

	private static final long serialVersionUID = 6673717245012085787L;
	
	private int activeIndex;
	
	@Inject
	private EmployeeBean employeeBean;

	public int getActiveIndex() {
		return activeIndex;
	}

	public void setActiveIndex(int activeIndex) {
		this.activeIndex = activeIndex;
	}
	
	public String doShowIndex() {
		this.activeIndex = 0;
		return "index";
	}
	
	public String doShowEmployees() {
		this.activeIndex = 1;
		return this.employeeBean.findAllEmployees();
	}
}
